//
//  ZZHomeHeaderView.m
//  ZuZuBao
//
//  Created by Felix on 2024/4/16.
//

#import "ZZHomeHeaderView.h"

@implementation ZZHomeHeaderView

-(instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        UIImageView * backImgView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kNavBarHeight - 44 + 186)];
        backImgView.image = [UIImage imageNamed:@"home_top_image"];
        [self addSubview:backImgView];
        
        UIImageView * imgView = [[UIImageView alloc] initWithFrame:CGRectMake(kPadding, kNavBarHeight - 44 + 148, kScreenWidth - kPadding * 2, 140)];
        imgView.image = [UIImage imageNamed:@"home_item_image"];
        [self addSubview:imgView];
        
        self.segView = [[ZZButtonSegView alloc] initWithFrame:CGRectMake(kPadding, CGRectGetMaxY(imgView.frame) + kPadding, kScreenWidth - kPadding * 2, 26)];
        [self.segView setZZButtonSegWithArray:@[@"全部", @"游戏手柄", @"电脑显示屏", @"游戏电主机"]];
        [self addSubview:self.segView];
    }
    return self;
}

- (void)setViewData {
    
}

@end
